<?php /*a:6:{s:41:"F:\WWW\youni\view\admin\config\index.html";i:1569383082;s:40:"F:\WWW\youni\view\admin\common\base.html";i:1570370238;s:42:"F:\WWW\youni\view\admin\common\header.html";i:1567752197;s:39:"F:\WWW\youni\view\admin\common\css.html";i:1570602032;s:42:"F:\WWW\youni\view\admin\common\footer.html";i:1567752456;s:38:"F:\WWW\youni\view\admin\common\js.html";i:1570520786;}*/ ?>


    <!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>优你后台</title>

    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->



    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>

<link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/static/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="/static/admin/css/animate.css" rel="stylesheet">
<link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
<link href="/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/static/admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<link href="/static/admin/css/plugins/switchery/switchery.css" rel="stylesheet">
<link href="/static/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">

<link href="/static/admin/css/plugins/fileinput/fileinput.css" rel="stylesheet">
<link href="/static/admin/css/common.css" rel="stylesheet">

<style>
    .table > tbody > tr {
        text-align: center;
    }
    .table tr>th{
        text-align: center;
    }
    .dropdown-menu > .active > a{
        /*background-color:#1ab394;*/
    }
</style>
</head>







<!-- Panel Other -->
<div class="ibox float-e-margins">
    <div class="ibox-title">
        <h5>配置列表</h5>
    </div>
    <div class="ibox-content">
        <div class="row row-lg">
            <div class="col-sm-12">
                <!--搜索框开始-->
                <form id='commentForm'  method="post" class="form-inline">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="配置名称" id="name" name="name">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="标题" id="title" name="title">
                    </div>

                    <div class="form-group">
                        <button class="btn btn-primary" type="button" style="margin-top:5px" id="search"><strong>搜 索</strong>
                        </button>
                    </div>
                </form>
                <!--搜索框结束-->
                <div class="btn-group-sm" id="toolbar">
                    <button class="btn btn-default btn-outline" type="button" name="refresh" aria-label="refresh" title="刷新">
                        <i class="fa fa-refresh"></i>
                    </button>

                    <button type="button" id="add" class="btn btn-primary button-margin" onclick="CodeGoods.add()">
                        <i class="fa fa-plus"></i>&nbsp;添加
                    </button>

                    <button type="button" id="edit" class="btn btn-warning button-margin" onclick="CodeGoods.edit()">
                        <i class="fa fa-edit"></i>&nbsp;编辑
                    </button>

                    <button type="button" id="del" class="btn btn-danger button-margin" onclick="CodeGoods.del()">
                        <i class="fa fa-trash"></i>&nbsp;删除
                    </button>
                </div>
                <table id="cusTable" class="table table-bordered">
                </table>
            </div>
        </div>
    </div>
</div>
<!-- End Panel Other -->



    



    <!-- 全局js -->
<script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/static/admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/static/admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/static/admin/js/plugins/layer/layer.min.js"></script>
<script src="/static/admin/js/plugins/iCheck/icheck.min.js"></script>
<script src="/static/admin/js/plugins/switchery/switchery.js"></script><!--IOS开关样式-->

<!-- 自定义js -->
<script src="/static/admin/js/hplus.js?v=4.1.0"></script>
<script src="/static/admin/js/contabs.js"></script>
<script src="/static/admin/js/content.js"></script>

<script src="/static/admin/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/static/admin/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/static/admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<!-- 第三方插件 -->
<!--<script src="/static/admin/js/plugins/pace/pace.min.js"></script>-->
<script src="/static/admin/js/plugins/fileinput/fileinput.js"></script>
<script src="/static/admin/js/plugins/fileinput/fileinput_locale_zh.js"></script>
<!-- 欢迎信息 -->
<script src="/static/admin/js/welcome.js"></script>


<script src="/static/admin/js/common.js"></script>

<script src="/static/admin/js/ry-ui.js"></script>
<script>
    $(document).ready(function(){
        $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green"});
        //IOS开关样式配置
        var elem = document.querySelector('.js-switch');
        var switchery = new Switchery(elem, {
            color: '#1AB394'
        });
        var config = {
            '.chosen-select': {},
        }
    });

</script>



<script type="text/javascript">
    function initTable() {
        //先销毁表格
        $('#cusTable').bootstrapTable('destroy');
        //初始化表格,动态从服务器加载数据
        $("#cusTable").bootstrapTable({
            method: "get",  //使用get请求到服务器获取数据
            url: "<?php echo url('config/index'); ?>", //获取数据的地址
            striped: true,  //表格显示条纹
            toolbar: '#toolbar',              //工具按钮用哪个容器
            toolbarAlign:'left',
            showColumns: true,                  //是否显示所有的列（选择显示的列）
            showRefresh: true,                  //是否显示刷新按钮
            clickToSelect: true,                //是否启用点击选中行
            showToggle: true,                   //是否显示详细视图和列表视图的切换按钮
            cardView: false,                    //是否显示详细视图
            silent: true,
            strictSearch: true,
            pagination: true, //启动分页
            pageSize: 10,  //每页显示的记录数
            pageNumber:1, //当前第几页
            pageList: [5, 10, 15, 20, 25],  //记录数可选列表
            sidePagination: "server", //表示服务端请求
            paginationFirstText: "首页",
            paginationPreText: "上一页",
            paginationNextText: "下一页",
            paginationLastText: "尾页",
            queryParamsType : "undefined",
            columns:[[
                {checkbox: true,fixed: true},
                {field:'name',title:'配置名称'},
                {field:'title',title:'标题'},
                {field:'type',title:'类型'},
                {field:'group',title:'分组'},
                {field:'sort',title:'排序'},
                {field:'status',title:'状态',formatter:function (value) {
                    if(value=='1'){
                        return '<span class="text-navy"><i class="fa fa-circle"></i> 启用</span>';
                    }else if (value=='0'){
                        return '<span class="text-danger"><i class="fa fa-circle"></i> 禁用</span>';
                    }
                }},
                {field:'operate',title:'操作',formatter:function (value) {
                    return ' <button class="btn btn-primary btn-xs db-import"><i class="fa fa-edit"></i>&nbsp;编辑</button>&nbsp;<button class="btn btn-danger btn-xs db-import"><i class="fa fa-trash"></i>&nbsp;删除</button>';
                }}
            ]],
            queryParams: function queryParams(params) {   //设置查询参数
                var param = {
                    pageNumber: params.pageNumber,
                    pageSize: params.pageSize,
                    searchText:$('#title').val()
                };
                return param;
            },
            onLoadSuccess: function(res){  //加载成功时执行
                if(1== res.code){
                    window.location.reload();
                }
                layer.load(0, {shade: false,time:1000});
            },
            onLoadError: function(){  //加载失败时执行
                layer.msg("加载数据失败");
            }
        });
    }

    $(document).ready(function () {
        //调用函数，初始化表格
        initTable();
        $("td,th").addClass("text-center");
        //当点击查询按钮的时候执行
        $("#search").bind("click", initTable);

    });

    CodeGoods.add = function (value) {
        var url = location.search;
        var index = layer.open({type: 2,title: '创建数据',area: ['800px', '100%'],fix: false, maxmin: true,content: Feng.ctxPath + '/Member/add'+url});
        this.layerIndex = index;
    }
</script>
